package com.agilestudio.modules.utils.flexigrid;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.collections.FactoryUtils;
import org.apache.commons.collections.list.LazyList;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.agilestudio.modules.orm.Page;
import com.agilestudio.modules.orm.Filter;
public class FlexiGrid<T>  extends Page<T>{


	private String qtype;
	
	private String query;
	
	private int rp;	

	private List<Filter> addparams =LazyList.decorate(
		      new ArrayList<Filter>(),
		      FactoryUtils.instantiateFactory(Filter.class));

	public String toString() {
		// MULTI_LINE_STYLE
		return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE, true, true);
	}

	public String getQtype() {
		return qtype;
	}

	public void setQtype(String qtype) {
		this.qtype = qtype;
	}

	public String getQuery() {
		return query;
	}

	public void setQuery(String query) {
		this.query = query;
	}

	public int getRp() {
		return rp;
	}

	public void setRp(int rp) {
		this.rp = rp;
		setPageSize(rp);
	}

	public List<Filter> getAddparams() {
		return addparams;
	}

	public void setAddparams(List<Filter> addparams) {
		this.addparams = addparams;
	}

	
}

